package com.sinog.front.controller.biz;

import com.sinog.core.utilbean.Constants;
import com.sinog.front.feign.biz.BjdxShgxService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @desc 帮教对象社会关系
 * @author sunsf
 * @date 2020-02-14-13:51
 */
@RestController
public class ShgxController {

    @Resource
    private BjdxShgxService bjdxShgxService;

    /**
     * 全部人员管理--新增--社会关系--父母列表
     * 查看 - 社会关系 - 配偶、父母或其他列表
     * @param priNum priNum
     * @return List<Map < String,String>>
     */
    @RequestMapping("/azbj/bjdxInfo/qbrygl/addBaseInfo/getShgxList")
    public List<Map<String,String>> getShgxList(@RequestParam(required = false, defaultValue = "-1") String priNum) {
        List<Map<String,String>> list = new ArrayList<>(16);
        if(!StringUtils.equals(priNum,Constants.NumberStr.NUM_STR_FU_ONE)) {
            list = bjdxShgxService.getShgxParentList(priNum);
        }
        return list;
    }
}